﻿using System;
using System.Resources;
using System.Xml.Serialization;
using Microsoft.Cci;

using SpCop.Model;

namespace SpCop.Core.Model
{
    [Serializable]
    public class Package : IVisitable<Package>
    {
        public ProductVersion ProductVersion = ProductVersion.Unknown;

        public Manifest[] FeatureManifests = new Manifest[0];
        public Feature[] Features = new Feature[0];
        public ulong FileSize;
        public string[] Files = new string[0];
        public Guid Id;
        public string Name;
        public string Path;


        [XmlIgnore] 
        public ResXResourceSet[] Resources = new ResXResourceSet[0];
        //[XmlIgnore]
        //public AssemblyNode[] Assemblies = new AssemblyNode[0];
        [XmlIgnore] 
        public INamedTypeDefinition[] ModuleTypes = new INamedTypeDefinition[0];
        [XmlIgnore] 
        public IModule[] Modules = new IModule[0];
        
        public string[] RootFiles = new string[0];
        public SiteDefinition[] SiteDefinitions = new SiteDefinition[0];
        


        // for serialization
        public Package()
        {
        }

        public Package(string name, string path)
        {
            Name = name;
            Path = path;
        }

        #region IVisitable<Package> Members

        public void Accept(IVisitor<Package> visitor)
        {
            visitor.Visit(this);
        }

        #endregion




    }
}